package com.ilink.ilinkcommon.domain.PO.studyservice;

/**
 * <h3>new-ilink-java-backend</h3>
 *
 * @Description <p>课程的文档资源的实体类表</p>
 * @Author pengshiyao
 * @Date 2024-09-16 15:00
 **/

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @ClassName StudyFileSource
 * @Description
 * @Author pengshiyao
 * @Date 2024-09-16 15:00
 **/
@Data
@TableName("study_filesource")
public class StudyFileSource implements Serializable {

    @TableId(type = IdType.INPUT)
    private Long filesourceId;           // 文档资源的唯一标识

    private String filesourcePath;       // 文档资源的相对路径

    private Long fileId;                 // 所归属的文件夹 ID

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdAt;         // 创建时间

    @TableField("introduction")
    private String introduction;
    @TableField("mindmap")
    private String mindMap;              // 脑图

    private String translation;          // 翻译

    private String tongyiId;             //通义对应的文件ID

    private String fileName;

    @TableField("oss_write_status")
    private Boolean ossWriteStatus = false;  // OSS写入状态，默认值为 FALSE

    @TableField("rag_complete_status")
    private Boolean ragCompleteStatus = false;  // RAG 完成状态，默认值为 FALSE

    @TableField("smart_text_status")
    private Boolean smartTextStatus = false;  // 智文完成状态，默认值为 FALSE

    @TableField("handle_complete_status")
    private Boolean handleCompleteStatus = false;//加工完成状态

    @TableField("course_id")
    private Long courseId;               // 所归属的课程ID，外键关联 study_teacher_courses

    // 内部类用于返回指定的字段
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class FileContentDTO {

        private String introduction;
        private String translation;
        private String mindmap;
    }
}
